package com.cskaoyan.javase.oop2._1extend._8override;

/**
 * @description: 不是方法重载
 * @author: wuguidong@cskaoyan.onaliyun.com
 **/

public class Demo2 {
    public static void main(String[] args) {
        Cat c = new Cat();
        c.test(10);
        c.test();

        Animal a = new Cat();
        c.test(10);
        c.test();
    }
}
class Animal{
    void test(){
        System.out.println("hello");
    }
}
class Cat extends Animal{
    //@Override
    void test(int a){
        System.out.println("hello" + a);
    }
}
